#include <REGX52.H>

sbit LED=P2^0;

void Delay(unsigned int datas)
{
	while(datas--);
}
void main()
{
	unsigned int time=0;
	while(1)
	{
		for(time=0;time<300;time++)
		{
			LED=0;
			Delay(time);
			LED=1;
			Delay(300-time);
		}
		for(time=300;time>0;time--)
		{
			LED=0;
			Delay(time);
			LED=1;
			Delay(300-time);
		}
	}
}